const util = require('../../utils/util.js')
Component({

  properties: {
    authorization: {
      type: Boolean,
      value: false,
      observer: function (e) {
       
      }
    },
    yindao: {
      type: Boolean,
      value: false,
      observer: function (e) {
       
      }
    },
  },
  data: {
    imgUrl: getApp().globalData.imgUrl,
    imgUrls: getApp().globalData.imgUrls,
  },
  methods: {
    bindGetUserInfo(e) {
      var that = this
      this.setData({
        authorization: false
      })
      if (e.detail.userInfo) {
        console.log(e.detail.userInfo)
        util.API('wechat/authorize/updateapp', {
          nick_name: e.detail.userInfo.nickName,
          cover: e.detail.userInfo.avatarUrl,
        })
       
      } else {
       
      }
    },
    quxiao(e){
      this.setData({
        authorization: false
      })
    },
    formidSubmit(e){
      getApp().sendFromId(e.detail.formId)
    }

  }
})